ci/make-git-snapshot.sh: auto-initialize submodules
authorJonathan Lebon <jonathan@jlebon.com>
Thu, 3 Feb 2022 18:22:47 +0000 (13:22 -0500)
committerJonathan Lebon <jonathan@jlebon.com>
Thu, 3 Feb 2022 18:22:47 +0000 (13:22 -0500)
Matches `autogen.sh`.

ci/make-git-snapshot.sh

index 391af64d1db813d1a16fa380534bb4cbf435491c..1b17b93f7042ccfd25a75d1ebe16aba0ccbaeb2a 100755 (executable)
@@ -11,6 +11,10 @@ PKG_VER="${name}-${version}"
 TARFILE=${PKG_VER}.tar
 TARFILE_TMP=${TARFILE}.tmp
 
+if ! test -f ${TOP}/libglnx/README.md || ! test -f ${TOP}/bsdiff/README.md; then
+    git submodule update --init
+fi
+
 echo "Archiving ${PKG_VER} at ${GITREV} to ${TARFILE_TMP}"
 (cd ${TOP}; git archive --format=tar --prefix=${PKG_VER}/ ${GITREV}) > ${TARFILE_TMP}
 ls -al ${TARFILE_TMP}